function h=plotmatches2(I, P, matches)
[M, N, K] = size(I);

axes('Position', [0 0 1 1]) ;
imagesc(I) ; hold on ; axis image ; axis off ;

K = size(matches, 2) ;
nans = NaN * ones(1,K) ;

x = [ P(1,matches(1,:)) ; P(1,matches(2,:)) ; nans ] ;
y = [ P(2,matches(1,:)) ; P(2,matches(2,:)) ; nans ] ;

h = line(x(:)', y(:)') ;
set(h,'Marker','.','Color','g') ;
